package lab02.Test37;

public class StudentDemo {
    public static void main(String[] args) {
        Undergraduate undergraduate=new Undergraduate();
        undergraduate.name="zhang";
        undergraduate.math=88;
        undergraduate.english=90;
        undergraduate.java=92;
        Graduate graduate=new Graduate();
        graduate.name="wang";
        graduate.math=60;
        graduate.english=66;
        graduate.java=75;
        if(undergraduate.average()>60){
            System.out.println("本科生"+undergraduate.name+"通过");
        }else System.out.println("本科生"+undergraduate.name+"不通过");
        if(graduate.average()>80){
            System.out.println("研究生"+graduate.name+"通过");
        }else System.out.println("研究生"+graduate.name+"不通过");
    }
}
